package com.example.database;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteDatabase.CursorFactory;
import android.database.sqlite.SQLiteOpenHelper;
import android.util.Log;

public class DatabaseSHHelper extends SQLiteOpenHelper {

	private static final int VERSION = 1;
	private String exesql;
	public DatabaseSHHelper(Context context, String name, CursorFactory factory,
			int version) {
		super(context, name, factory, version);
		// TODO Auto-generated constructor stub
	}
	
	public DatabaseSHHelper(Context context, String name,String sql) {
		this(context, name, VERSION, sql);

		// TODO Auto-generated constructor stub
	}
	
	public DatabaseSHHelper(Context context, String name, int version, String sql) {
		this(context, name, null, version);
		exesql = sql;
		// TODO Auto-generated constructor stub
	}
	
	

	@Override
	public void onCreate(SQLiteDatabase db) {
		// TODO Auto-generated method stub
		//System.out.println("create a datebase");
		Log.e("supersky","create a datebase");
		db.execSQL(exesql);
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
		// TODO Auto-generated method stub
		System.out.println("update datebase");
	}


	
	


}
